# 爬虫配置文件

# 网站基础信息
BASE_URL = "http://music.2t58.com/list/new.html"

# 请求头配置
HEADERS = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
    "Accept-Language": "zh-CN,zh;q=0.9",
    "Referer": "http://music.2t58.com/",
}

# 爬取配置
MAX_RETRY = 3  # 最大重试次数
TIMEOUT = 30  # 请求超时时间（秒）
DELAY = 2  # 爬取间隔（秒）
MAX_CONCURRENT = 5  # 最大并发数

# 存储配置
MUSIC_SAVE_PATH = "/System/Volumes/Data/webcode/test/music/data/music/"  # 音乐保存路径
DB_TYPE = "sqlite"  # 数据库类型：sqlite或mongodb
SQLITE_DB_PATH = "/System/Volumes/Data/webcode/test/music/data/music.db"  # SQLite数据库路径
MONGODB_URI = "mongodb://localhost:27017/"  # MongoDB连接地址
MONGODB_DB_NAME = "music_crawler"  # MongoDB数据库名

# 日志配置
LOG_LEVEL = "INFO"  # 日志级别：DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_FILE = "/System/Volumes/Data/webcode/test/music/docs/crawl_log.md"  # 日志文件路径